﻿using Caliburn.Micro;
using SverigesRadio.SverigesRadioApp.Business;

namespace SverigesRadio.SverigesRadioApp.WindowsPhoneApplication.ViewModels.Programs
{
    public class ProgramPageViewModel : NavigatableViewModelBase
    {
        public ProgramPageViewModel(INavigationService navigationService, IDataContext dataContext) : 
            base(navigationService, dataContext)
        {

        }

        private string programCategoryTitle;
        public string ProgramCategoryTitle
        {
            get { return programCategoryTitle; }
            set
            {
                programCategoryTitle = value;
                NotifyOfPropertyChange(() => ProgramCategoryTitle);
            }
        }

        private string programTitle;
        public string ProgramTitle
        {
            get { return programTitle; }
            set
            {
                programTitle = value;
                NotifyOfPropertyChange(() => ProgramTitle);
            }
        }

        public string UnitId { get; set; }
        public string PoddId { get; set; }

        public void LatestBroadcastButton()
        {

            
            
        }

        public void BroadcastArchiveButton()
        {
            NavigationService.UriFor<ProgramBroadcastArchivePageViewModel>().WithParam(p => p.ProgramTitle, ProgramTitle)
                .WithParam(p => p.ProgramCategoryTitle, ProgramCategoryTitle).Navigate();
        }
    }
}
